#pragma once

#include<SFML/Graphics.hpp>

#include"GameEngine.h"
#include"EventManager.h"
#include"Level.h"
#include"ImageManager.h"
#include "ConfigurationManager.h"

class Application
{
private:
	//Initialization
	Application(void);
	~Application(void);

	//Fields
	sf::RenderWindow _RenderWindow;
	sf::Clock _Clock;
	EventManager _EventManager;
	Level *_Level;
	ImageManager _ImageManager;
	ConfigurationManager _ConfigurationManager;

	float _FrameRate;
	int _ThinkRate;

public:
	//Methods
	void Initialize();
	void Run();

	//Properties
	sf::RenderWindow& RenderWindow() { return _RenderWindow; }
	EventManager InputManager() { return _EventManager; }
	ImageManager ImageManager() { return _ImageManager; }
	Level& Level() { return *_Level; }
	float FrameRate() { return _FrameRate; }
	int ThinkRate() { return _ThinkRate; }

	//Sigleton
	static Application& Instance() 
	{ 
		static Application vInstance;
		return vInstance; 
	}
};
